/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package topico1;

/**
 *
 * @author leovirgilio
 */
public class MC30 {

    public static void main(String[] args) {
        int m[][] = {{0, 72, 396, 90, 215},
            {15, 0, 417, 75, 30},
            {39, 41, 0, 46, 11},
            {90, 75, 86, 0, 105},
            {115, 302, 371, 105, 0}};
        int menorelemento = 1000000, eleatual;
        int i, j;
        double mult = 1;
        for (i = 0; i < 5; i++) {
            for (j = 0; j < 5; j++) {
                if (i != j) {
                    eleatual = m[i][j];
                    mult *= eleatual;
                    if (menorelemento > m[i][j]) {
                        menorelemento = m[i][j];
                    }
                }
            }
            System.out.println("\nElemento da " + i + " linha: " + (mult / menorelemento));
            mult = 1;
        }
    }
}
